#include <stdio.h>
int main()
{
  int n, base, i;
  base = 1;
  printf("Enter number: ");
  scanf("%d", &n);
  if ( (n == 0) || (n == 1))
    {
	  base = 1;
	}
	else 
	{
  for (i = 1; i <= n; ++i)
   {
      base = base * i;
   }
    }
   printf("%d", base);
}
